﻿
@{
    ViewBag.Title = "课程管理";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@section Header
{
<link href="~/assets/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css" rel="stylesheet" />
<script src="~/assets/plupload/plupload.full.min.js"></script>
<script src="~/assets/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js"></script>
<script src="~/assets/plupload/i18n/zh_CN.js"></script>
}

<ol class="breadcrumb">
    <li><a href="@Url.Action("CourseManager","Admin")">课程管理</a></li>
    <li>@ViewBag.CourseName</li>
    <li>课程设置</li>
</ol>

<div class="col-md-2">
    <div class="list-group">
        <a href="@Url.Action("Course", "Admin", new { cid = ViewBag.CourseId })" class="list-group-item active">课程设置</a>
        <a href="@Url.Action("ClassHour", "Admin", new { cid = ViewBag.CourseId })" class="list-group-item ">课时管理</a>
        <a href="@Url.Action("FileManager", "Admin", new { cid = ViewBag.CourseId })" class="list-group-item ">文件管理</a>
        <a href="#" class="list-group-item ">试题管理</a>
    </div>
</div>

<div class="col-md-10">
    <!--文件上传-->
    <form method="post" action="@Url.Action("Upload", "Test")">
        <div id="uploader">
            <p>您的浏览器不支持上传插件：Flash、Silverlight或HTML5。</p>
        </div>
    </form>
    <script type="text/javascript">
        $(function () {

            $("#uploader").pluploadQueue({
                // 常规设置
                runtimes: 'html5,flash,silverlight,html4',
                url: '@Url.Action("CourseImgUpload", "Admin")',
                //browse_button: 'btn_browse',
                chunk_size: '1mb',
                rename: true,
                dragdrop: true,
                multipart_params: {
                    'cid': '@ViewBag.CourseId'
                },
                // Views to activate
                views: {
                    list: true,
                    thumbs: true, // Show thumbs
                    active: 'thumbs'
                },

                filters: {
                    // 最大文件尺寸
                    max_file_size: '1024mb',
                    // 支持文件类型
                    mime_types: [
                        { title: "Image files", extensions: "jpg,gif,png" },
                        { title: "Zip files", extensions: "zip" },
                        { title: "Media files", extensions: "mp4,wmv" }
                    ]
                },

                // 缩略图质量和尺寸
                //resize: { width: 320, height: 240, quality: 90 },

                flash_swf_url: '@Url.Content("~/assets/plupload/Moxie.swf")'
            });

        });
    </script>

</div>
